﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using HigLabo.WindowsAzure.RestService.Extensions;

namespace HigLabo.WindowsAzure.RestService.ServiceManagement
{
    public class Role
    {
        public static readonly String ElementName = "Role";

        public String RoleName { get; private set; }
        public String OsVersion { get; private set; }

        public Role(XElement xml)
        {
            if (xml == null)
            {
                throw new ArgumentNullException("xml");
            }
            this.RoleName = xml.ValueOrEmpty("RoleName");
            this.OsVersion = xml.ValueOrEmpty("OsVersion");
        } 
    }
}
